package com.edu.whty.service;


import com.edu.whty.entity.base.PageList;
import com.edu.whty.entity.disk.ResOwner;
import com.edu.whty.entity.share.ResShare;
import com.edu.whty.service.impl.ResShareServiceImpl;

import java.util.List;

/**
 * @desc	资源分享表Service接口类
 * @author	
 * @date	2014-11-25
 */
public interface ResShareService {

    /**
     * 新增
     * @param resShare
     * @throws Exception
     */
    void addResShare(ResShare resShare) throws Exception;

    /**
     * 新增
     * @param list
     * @throws Exception
     */
    void addResShareBatch(List<ResShare> list) throws Exception;


    /**
	 * 根据主键查询
	 * @param ResShare
	 * @return
	 */
    ResShare getResShare(ResShare resShare) throws Exception;


    List<ResShare> getResShareList(ResShare resShare) throws Exception;



    /**
     * 根据userid查询一条数据，用于获取该用户的userAvatar(分享者缩略图)
     * @param userid
     * @author 冯光亮
     */
    ResShare getResShareByUserid(String userid) throws Exception;

    /**
     * 个人网盘7.0 分享首页分页查询业务逻辑
     * @param page
     * @return
     * @throws Exception
     */
    PageList queryForPaginationBy7(String userId) throws Exception;

    /**
     * 个人网盘7.0 分享根据短码获取分享文件信息
     * @param shortCode
     * @return
     */
    List<ResShare> queryByShortCode(String shortCode);

    /**
     * 根据shareIds查找分享数据
     * @param shareIds
     * @return
     */
    List<ResShare> queryListByShareIds(String shareIds) throws Exception;


    List<ResOwner> selectPubShareByShortCode(String shortCode);

    List<ResShare> queryListByResId(String resId) throws Exception;

    void deleteResShare(ResShare resShare)throws Exception;
}
